package org.firebug.spring.boot.swagger.api.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.firebug.common.core.dict.Gender;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
@ApiModel("用户VO")
public class UserVO implements Serializable {
    @ApiModelProperty(value = "ID", required = true, example = "1")
    private Long id = 1L;

    @ApiModelProperty(value = "姓名", required = true, example = "felix")
    private String name = "felix";

    @ApiModelProperty(value = "薪资", required = true, example = "3000.99")
    private BigDecimal salary = BigDecimal.TEN;

    @ApiModelProperty(value = "性别", required = true, example = "M")
    private Gender gender = Gender.M;

    @ApiModelProperty(value = "出生日期", required = true, example = "2018-01-01")
    @JsonFormat(pattern="yyyy-MM-dd", timezone="GMT+8")
    private Date birthday = new Date();
}
